home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / prog / basic1a.arj / BASIC.DOC next >
Text File  |  1993-10-02  |  5KB  |  97 lines

  1.                       WELCOME TO BASIC .LIB                      
  2.  
  3.         Any Problems Send Mail on CompuData to John Werner   
  4.                             REMEMBER                                                        
  5.                 This is SHAREWARE NOT FREEWARE                               
  6.            If after 30 days you continue to use BASIC.LIB              
  7.                     Send the the author $15.00 to                            
  8.                        John Werner SEMCOR INC.                             
  9.                            208 RT.38                           
  10.                         Moorestoen NJ 08057                          
  11.                                                        
  12.  
  13. Allow me a minute to explain why this library was written. I
  14. just started programming in CLIPPER 5.2 about 4 months ago. I
  15. didn't even know this language existed, until my new job when I was
  16. hired as a software debugger. I was told the program I was to
  17. debug, was written in clipper. They told me it was a very powerful
  18. language. I had no idea what they meant (now I do).
  19.      As the months went by, I kept seeing how powerful clipper was.
  20. So, I decided to try to learn the language. After about a month of
  21. trying to learn programming in clipper, I started to write clipper
  22. code. I kept asking the programmers at my company for help.
  23.      One of the key things the programmers would tell me, is 
  24. WRITE CODE YOU CAN RE-USE. This means generic functions that you
  25. can reuse over and over again. I have included seven of the most
  26. used functions I know of.
  27.  
  28.  
  29. Listing of the FUNCTIONS
  30.  
  31. 1. MessageBox()
  32.      All this function does is display a box  in the center of    
  33.      the screen,  and lets the user display text and color.
  34.    SYNTAX = MESSAGEBOX("begin", "Please Wait", "w+/rb", "W+*/rb")
  35.             MESAAGEBOX("end")      
  36.       MESSAGEBOX : Is the name of the function call
  37.       BEGIN      : means display it to the  screen END will 
  38.                    reset the screen to its setting, before this 
  39.                    function was called   
  40.       PLEASE WAIT: This is the text to be displayed in the box
  41.                    color is to be set later      
  42.       W+/RB      : Draw a box at row 12 to row 14 (this is assumed 
  43.                    as the center), center the box and color it (in 
  44.                    this case  cyan)    
  45.        W+*/rb    : This is the color of the text displayed in the 
  46.                    box (in this case white bright blinking on a   
  47.                    background of cyan)
  48.                    note: this is usually followed by INKEY(0)   
  49.    OK Now the box is on the screen
  50.     Lets get rid of it,  and restore the original screen
  51.    SYNTAX = MESSAGEBOX("end")
  52.       This gets rid of the box and restores the screen to it      
  53.       original colors         
  54.  
  55.  
  56. 2. Jheader
  57.      This function displays a line at the top of your program,    
  58.      and centers the text. great for identifying what you are     
  59.      about to do.  eg. Jheared("Enter to select.... ESC to Quit", 
  60.      "w+/r")
  61.       The first parameter is the text- the next is the color 
  62.        In the case 
  63.        SAY ENTER TO SELECT... ESC TO QUIT at the top of the       
  64.        screen the colors would be white bright on red 
  65. 3. Footer
  66.     This function works the same a Jheader but put the centered   
  67.     text on the bottom line #24 
  68.     EG...Footer("page up-down to view records F1 for help"        
  69.     "bg+/n")  
  70.  
  71. 4. PleaseWait
  72.      This function draws a please wait... box in the center of the screen.
  73.     SYNTAX PleaseWait()
  74.  
  75. 5. Shadow 
  76.     This function draws a transparent shadow under a box.
  77.    SYNTAX Shadow(2, 3, 4, 50)
  78.  
  79. 6. PercentBox
  80.      This function draws a percent meter on line 12 and lets you
  81.      specify the column. It calculates the total records checks  
  82.      what record you are on, and figures out the percent left to do.
  83.     SYNTAX PercentBox("54")
  84.  
  85. 7. Settings
  86.     This function saves the current SET() settings to a local array      
  87.     (Aset{}) and then can be restored at the end of the function or      
  88.     procedure.
  89.    SYNTAX   LOCAL Aset :={}
  90.             Settings("begin", Aset)  //to start function
  91.             Settings("end", Aset) //to end function
  92.      
  93.      This function is great because you change the color, cursor        
  94.      whatever and when the function ends it restores the settings       
  95.      back to what they were before the function started.
  96.  
  97.